"""add address model

Revision ID: 978b99fe36cc
Revises: 8c5af5e575e6
Create Date: 2025-06-30 21:39:29.822357

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '978b99fe36cc'
down_revision: Union[str, Sequence[str], None] = '8c5af5e575e6'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('address',
    sa.Column('id', sa.String(length=200), nullable=False),
    sa.Column('realname', sa.String(length=100), nullable=True),
    sa.Column('mobile', sa.String(length=20), nullable=True),
    sa.Column('region', sa.String(length=200), nullable=True),
    sa.Column('detail', sa.String(length=200), nullable=True),
    sa.Column('user_id', sa.BigInteger(), nullable=True),
    sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('address')
    # ### end Alembic commands ###
